from django.db import models

# Create your models here.
class category(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=100, unique=True, verbose_name="类目名称")
    desci = models.TextField(blank=True, verbose_name="描述")
    datet = models.DateField(auto_now_add=True,verbose_name="上市日期")

class Fu(models.Model):
    id = models.AutoField(primary_key=True,auto_created=True)
    title = models.CharField(max_length=20, verbose_name="服饰名称")
    price = models.DecimalField(max_digits=10, decimal_places=2, verbose_name="价格")
    publish_date = models.DateField(auto_now_add=True,verbose_name="售卖日期")
    category = models.ForeignKey(category,on_delete=models.CASCADE,related_name='aa', verbose_name="所属分类")